<?php
include '../connect/common_start.php';
if(isset($_REQUEST['mem_id']))
{
	$mem_id=$_REQUEST['mem_id'];
	if(isset($_REQUEST['post_id']))
	{
		$post_id=$_REQUEST['post_id'];
		$result=mysql_query("SELECT SUM(l.`like`) as total FROM `like` l WHERE l.id_mem='$mem_id' AND l.id_post='$post_id'");
		if(mysql_num_rows($result)>0){
			$r = mysql_fetch_assoc($result);
			echo json_encode($r);
		}else{
			echo '[]';
		}
	}

}
include '../connect/common_end.php';
?>
